package com.eshin.autotest.service;

import com.eshin.autotest.bean.OrderBean;
import com.eshin.configuration.HelloConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.*;

import javax.annotation.PostConstruct;

/**
 * @author Eshin
 * @title: HelloConfiguration
 * @projectName pay
 * @date 2019/5/2816:59
 */

@Configuration
public class HelloConfiguration3 {

    @PostConstruct
    public void init(){
        System.out.println("HelloConfiguration3 init...");
    }

    @Configuration
    static class HelloConfigurationInner30{
        @PostConstruct
        public void init(){
            System.out.println("HelloConfigurationInner30 init...");
        }
        @Bean
        public String getStr30(){
            System.out.println("helloTest in HelloConfigurationInner30");
            return "helloTest";
        }
        @Configuration
        class HelloConfigurationInner3{
            @PostConstruct
            public void init(){
                System.out.println("HelloConfigurationInner3 init...");
            }
            @Bean
//        @DependsOn("getStrX")
            public String getStr3(){
                System.out.println("helloTest in HelloConfigurationInner3");
                return "helloTest";
            }
        }
    }

}
